home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6107 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: news.connect.net!usenet
  2. From: tomw@intelligraphics.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Can anyone explain ?
  5. Date: 11 Feb 1996 22:43:41 GMT
  6. Organization: Connection Technologies
  7. Message-ID: <4flret$a9m@dallas1.connect.net>
  8. References: <823907577.10880@le-vamp.demon.co.uk>
  9. Reply-To: tomw@intelligraphics.com
  10. NNTP-Posting-Host: igxtest.intelligraphics.com
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <823907577.10880@le-vamp.demon.co.uk>, Kurt@le-vamp.demon.co.uk (Kurt Frary) writes:
  14. >
  15. >B) What the difference between
  16. >    Regs.w.ax - I have only a guess that this will load ax with
  17. >whatever 32 bit code, or am I being a lamer ?
  18. >and    Regs.h.bl - Load bl with whatever 16 bit ?
  19. >
  20. >C) How do i know how many parameters to pass to int386x ? i.e. Sregs,
  21. >regs e.t.c.
  22.  
  23. You're missing the difference between 8-bit, 16-bit, and 32-bit registers.
  24. ah and al are 8-bit; ax is 16-bit, and eax is 32-bit.  Read any decent
  25. assembly book for more.  I don't know what your meaning in C) is.  The
  26. usage is right there; it takes an integer interrupt number, a pointer to
  27. the input registers, a pointer to output registers, and a pointer to segment
  28. registers.
  29.  
  30. >static struct rminfo {
  31. >    long EDI;
  32. >    long ESI;
  33.  
  34. These are all 32-bit registers being declared here.  
  35.  
  36. >void scrmode(char scrmode)
  37. >{
  38. >    union REGS regs;
  39. >    struct SREGS sregs;
  40. >    int interrupt_no=0x31;
  41.  
  42. Regs is real-mode (i.e., 16-bit and 8-bit access).  You'll probably find the
  43. definition of REGS and SREGS in <dos.h>.
  44.  
  45. +---------------------------------------------------------------------------+
  46. + Tom Wheeler                          | Member NRA, NMRA                   +
  47. + tomw@intelligraphics.com             | OS/2 user, C++ programmer          +
  48. + ------------------------------------------------------------------------- +
  49. + Postmodernism is the refusal to think.  Deconstructionism is the refusal  +
  50. + to believe that anyone else can either.                                   +
  51. +---------------------------------------------------------------------------+
  52. + Use or reproduction of this document or the author's email address for    +
  53. + commercial purposes without the author's permission is prohibited.        +
  54. +---------------------------------------------------------------------------+
  55.  
  56.